﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SoftFX.Basic;

namespace Mql2Fdk
{
	/// <summary>
	/// 
	/// </summary>
	public class BarVolumes
	{
		internal BarVolumes(MqlAdapter adapter)
		{
			m_adapter = adapter;
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="index"></param>
		/// <returns></returns>
		public int this[int index]
		{
			get
			{
				Snapshot snapshot = m_adapter.CurrentSnapshot;
				return snapshot.Bars[index].Volume;
			}
		}
		#region members
		private readonly MqlAdapter m_adapter;
		#endregion
	}
}
